package com.ars.common.servlet;

import com.ars.common.beans.Active.Active;
import com.ars.common.dao.FindActiveInformation;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import java.sql.SQLException;
import java.util.TreeMap;

@WebServlet("/PublicationActive")
public class publicationActive extends HttpServlet {
    public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
    {

        TreeMap<Integer, Active> tmap = new TreeMap<Integer, Active>();
        try {
            tmap = new FindActiveInformation().findActive();
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
        System.out.println(tmap);
        request.setAttribute("actInfo",tmap);
        request.getRequestDispatcher("/admin/publicationActive.jsp").forward(request, response);
    }

    public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
    {

    }
}
